﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using WomanMotion.WebApi.Api.Utility;
using WomanMotion.WebApi.Model.Entitys;
using WomanMotion.WebApi.Service.IService;

namespace WomanMotion.WebApi.Api.Controllers
{
    /// <summary>
    /// 控制器基类
    /// </summary>
    //[AccessControl] 这种标记方式Attribute获取不到ICO容器服务，得用下面这一种标记方式
    //[ServiceFilter(typeof(AccessControlAttribute))] 不用这个了 用权限过滤器了
    [Authorize]
    public class BaseController : ControllerBase
    {
        /// <summary>
        /// 日志对象
        /// </summary>
        protected readonly ILogger _logger;

        /// <summary>
        /// 基类构造函数
        /// </summary>
        /// <param name="logger">注入日志</param>
        public BaseController(ILogger logger)
        {
            _logger = logger;
        }
    }
}